I didn’t find in OKTA documentation about how to request particular type of access token i.e opaque access token or JWT access token. I am using angular6 oidc-client package as client and OKTA as IDP to get access-token to get access to my protected API. My problem is i wanna use opaque string as access token instead of JWT but unable to figure out how to get that because by default i am getting jwt as access token.
constructor(private httpClient: HttpClient) {
Log.logger = console;
var config = {
authority: ‘https://dev-543130.okta.com/oauth2/default’,
client_id: ‘gI1DP5jl2pJxyMwYRsq3eHE*******’,
redirect_uri: ${Constants.clientRoot}assets/oidc-login-redirect.html
,
scope: ‘openid projects-api profile’,
response_type: ‘id_token token’,
post_logout_redirect_uri: ${Constants.clientRoot}?postLogout=true
,
userStore: new WebStorageStateStore({ store: window.localStorage }),
automaticSilentRenew: true,
silent_redirect_uri: ${Constants.clientRoot}assets/silent-redirect.html
,
};
this._userManager = new UserManager(config);
this._userManager.getUser().then(user => {
if (user && !user.expired) {
this._user = user;
this.loadSecurityContext();
}
});
this._userManager.events.addUserLoaded(args => {
this._userManager.getUser().then(user => {
this._user = user;
this.loadSecurityContext();
});
});
}