Commit 66f1c78d authored by Jie Yuan's avatar Jie Yuan

add aailogin com

parent 710904f5
<div class="container">
<div class="card card-container">
<button class="btn btn-sm btn-secondary btn-block" (click)="ConfirmWithB2Access()">Confirmation with AAI</button>
<!-- <button class="btn btn-sm btn-secondary btn-block" href="https://localhost:8443/login">Login with AAI</button> -->
</div>
</div>
\ No newline at end of file
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { AailoginComponent } from './aailogin.component';
describe('AailoginComponent', () => {
let component: AailoginComponent;
let fixture: ComponentFixture<AailoginComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ AailoginComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(AailoginComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
import { Component, OnInit } from '@angular/core';
import {Router} from '@angular/router';
import {AuthService} from '../auth.service';
@Component({
selector: 'app-aailogin',
templateUrl: './aailogin.component.html',
styleUrls: ['./aailogin.component.css']
})
export class AailoginComponent implements OnInit {
private token = ''
constructor(private authService: AuthService, public router: Router ) {
const parameters = new URLSearchParams(window.location.search);
this.token = parameters.get('AccessToken');
// console.log(this.token);
//console.log('ccccc');
}
ngOnInit() {
}
ConfirmWithB2Access(): void {
this.authService.aaiAuthentication( this.token);
//console.log(this.token);
//console.log('aai token');
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment