public class AuthorizationContext extends Object implements IAuthorizationContext
AUTHSCHEME_BASIC, AUTHSCHEME_OAUTH| Constructor and Description |
|---|
AuthorizationContext(String scope) |
AuthorizationContext(String token,
String expires,
IUser user,
String scheme) |
AuthorizationContext(String token,
String userName,
String password) |
| Modifier and Type | Method and Description |
|---|---|
AuthorizationContext |
clone() |
IAuthorizationDetails |
getAuthorizationDetails()
Retrieve the authorization details for a server
|
String |
getAuthScheme()
The authorization scope if it can be determined.
|
String |
getExpiresIn()
Time in ??
|
String |
getPassword()
Password to use to authenticate to retrieve a token
|
String |
getToken()
Token to use for authentication.
|
IUser |
getUser()
The authorized user if it can be found for this token
|
String |
getUserName()
A username to use for authenticating
|
boolean |
isAuthorized()
This can trigger a remote call if a user has not attempted to authorize
previously
|
void |
setClient(IClient client) |
void |
setPassword(String password)
Password to use to authenticate to retrieve a token
|
void |
setToken(String token)
The token to try and use for communication to the apiserver
|
void |
setUser(IUser user) |
void |
setUserName(String userName)
A username to use for authenticating
|
public AuthorizationContext(String scope)
public AuthorizationContext clone()
public void setClient(IClient client)
public boolean isAuthorized()
IAuthorizationContextisAuthorized in interface IAuthorizationContextpublic IAuthorizationDetails getAuthorizationDetails()
IAuthorizationContextgetAuthorizationDetails in interface IAuthorizationContextpublic String getToken()
IAuthorizationContextgetToken in interface IAuthorizationContextpublic String getExpiresIn()
IAuthorizationContextgetExpiresIn in interface IAuthorizationContextpublic String getAuthScheme()
IAuthorizationContextgetAuthScheme in interface IAuthorizationContextpublic IUser getUser()
IAuthorizationContextgetUser in interface IAuthorizationContextpublic void setUser(IUser user)
public void setToken(String token)
IAuthorizationContextsetToken in interface IAuthorizationContextpublic void setUserName(String userName)
IAuthorizationContextsetUserName in interface IAuthorizationContextpublic String getUserName()
IAuthorizationContextgetUserName in interface IAuthorizationContextpublic void setPassword(String password)
IAuthorizationContextsetPassword in interface IAuthorizationContextpublic String getPassword()
IAuthorizationContextgetPassword in interface IAuthorizationContextCopyright © 2019 Red Hat, Inc. All Rights Reserved.