@@ -5,6 +5,7 @@ import { Application, Domain, Certificate,APIResponse, Destination, IPMethod } f
55import { ApplicationService } from '../application.service' ;
66import { FormBuilder , FormGroup } from '@angular/forms' ;
77import { MessageService } from '../message.service' ;
8+ import { OAuthInfo } from '../models'
89
910@Component ( {
1011 selector : 'app-application-detail' ,
@@ -19,6 +20,7 @@ export class ApplicationDetailComponent implements OnInit {
1920 optionCertificates : Certificate [ ] ;
2021 no_certificate :Certificate ;
2122 enum_ip_method_values : { value : number ; name : string } [ ] = [ ] ; // number[]=[];
23+ oauth : OAuthInfo = new ( OAuthInfo ) ;
2224
2325 constructor (
2426 private route : ActivatedRoute ,
@@ -52,6 +54,9 @@ export class ApplicationDetailComponent implements OnInit {
5254 this . application . domains = [ ] ;
5355 this . application . ip_method = 1 ;
5456 this . application . destinations = [ ] ;
57+ this . application . oauth_required = false ;
58+ this . application . session_seconds = 86400 ;
59+ this . application . owner = this . applicationService . auth_user . username ;
5560 this . addDomain ( ) ;
5661 this . addDestination ( ) ;
5762 }
@@ -175,6 +180,13 @@ export class ApplicationDetailComponent implements OnInit {
175180 this . no_certificate . id = 0 ;
176181 this . no_certificate . common_name = 'No Certificate (HTTP Only)' ;
177182 this . getCertificates ( ) ;
183+
184+ // get oauth config
185+ let self = this ;
186+ this . applicationService . getResponseByURL ( '/janusec-admin/oauth/get' ,
187+ function ( obj : OAuthInfo ) {
188+ self . oauth = obj ;
189+ } ) ;
178190 }
179191
180192
0 commit comments