Fixes bug on B2Access login not having configurable "state".

This commit is contained in:
gkolokythas 2019-11-14 13:56:09 +02:00
parent 893547aee3
commit db5b285832
4 changed files with 11 additions and 4 deletions

View File

@ -36,7 +36,11 @@ export class B2AccessLoginComponent extends BaseComponent implements OnInit {
}
public b2AccessGetAuthCode() {
window.location.href = environment.loginProviders.b2accessConfiguration.oauthUrl + '?response_type=code&client_id=' + environment.loginProviders.b2accessConfiguration.clientId + '&redirect_uri=' + environment.loginProviders.b2accessConfiguration.redirectUri + '&state=987654321&scope=USER_PROFILE';
window.location.href = environment.loginProviders.b2accessConfiguration.oauthUrl
+ '?response_type=code&client_id=' + environment.loginProviders.b2accessConfiguration.clientId
+ '&redirect_uri=' + environment.loginProviders.b2accessConfiguration.redirectUri
+ '&state=' + environment.loginProviders.b2accessConfiguration.state
+ '&scope=USER_PROFILE';
}
public b2AccessLogin(code: String) {

View File

@ -24,7 +24,8 @@ export const environment = {
b2accessConfiguration: {
clientId: '',
oauthUrl: 'https://b2access-integration.fz-juelich.de:443/oauth2-as/oauth2-authz',
redirectUri: 'http://opendmp.eu/api/oauth/authorized/b2access'
redirectUri: 'http://opendmp.eu/api/oauth/authorized/b2access',
state: ''
},
orcidConfiguration: {
clientId: 'APP-766DI5LP8T75FC4R',

View File

@ -24,7 +24,8 @@ export const environment = {
b2accessConfiguration: {
clientId: '',
oauthUrl: 'https://b2access-integration.fz-juelich.de:443/oauth2-as/oauth2-authz',
redirectUri: 'http://devel.opendmp.eu/api/oauth/authorized/b2access'
redirectUri: 'http://devel.opendmp.eu/api/oauth/authorized/b2access',
state: ''
},
orcidConfiguration: {
clientId: '',

View File

@ -25,7 +25,8 @@ export const environment = {
b2accessConfiguration: {
clientId: '',
oauthUrl: 'https://b2access-integration.fz-juelich.de:443/oauth2-as/oauth2-authz',
redirectUri: 'http://opendmp.eu/api/oauth/authorized/b2access'
redirectUri: 'http://localhost:4200/api/oauth/authorized/b2access',
state: ''
},
orcidConfiguration: {
clientId: 'APP-766DI5LP8T75FC4R',