Fixes bug on B2Access login not having configurable "state".
This commit is contained in:
parent
893547aee3
commit
db5b285832
|
@ -36,7 +36,11 @@ export class B2AccessLoginComponent extends BaseComponent implements OnInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
public b2AccessGetAuthCode() {
|
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) {
|
public b2AccessLogin(code: String) {
|
||||||
|
|
|
@ -24,7 +24,8 @@ export const environment = {
|
||||||
b2accessConfiguration: {
|
b2accessConfiguration: {
|
||||||
clientId: '',
|
clientId: '',
|
||||||
oauthUrl: 'https://b2access-integration.fz-juelich.de:443/oauth2-as/oauth2-authz',
|
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: {
|
orcidConfiguration: {
|
||||||
clientId: 'APP-766DI5LP8T75FC4R',
|
clientId: 'APP-766DI5LP8T75FC4R',
|
||||||
|
|
|
@ -24,7 +24,8 @@ export const environment = {
|
||||||
b2accessConfiguration: {
|
b2accessConfiguration: {
|
||||||
clientId: '',
|
clientId: '',
|
||||||
oauthUrl: 'https://b2access-integration.fz-juelich.de:443/oauth2-as/oauth2-authz',
|
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: {
|
orcidConfiguration: {
|
||||||
clientId: '',
|
clientId: '',
|
||||||
|
|
|
@ -25,7 +25,8 @@ export const environment = {
|
||||||
b2accessConfiguration: {
|
b2accessConfiguration: {
|
||||||
clientId: '',
|
clientId: '',
|
||||||
oauthUrl: 'https://b2access-integration.fz-juelich.de:443/oauth2-as/oauth2-authz',
|
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: {
|
orcidConfiguration: {
|
||||||
clientId: 'APP-766DI5LP8T75FC4R',
|
clientId: 'APP-766DI5LP8T75FC4R',
|
||||||
|
|
Loading…
Reference in New Issue