Class SignInManager
- java.lang.Object
-
- com.blackberry.workspaces.api.sdk.SignInManager
-
public class SignInManager extends Object
SignInManager
-
-
Constructor Summary
Constructors Constructor Description SignInManager(APISession apiSession)
SignInManager constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
accessUri()
accessUriString
authUri()
authUriint
ExpiresInMinutes()
ExpiresInMinutesint
expiryTimeInSeconds()
expiryTimeInSecondsString
getAutoSignInEmail()
getAutoSignInEmailString
getEncryptionAlgorithm()
getEncryptionAlgorithmString
getOAuthAccessToken(String accessRequestUri, String email, String refreshToken)
getOAuthAccessTokenPrivateKey
getPrivateKey()
getPrivateKeyString
getRefreshToken()
getRefreshTokenorg.apache.maven.artifact.versioning.DefaultArtifactVersion
getServerVersion()
getServerVersionString
getServiceAccountToken(String userEmail, String issuer, int expiresInMinutes, PrivateKey privateKey, String encryptionAlgorithm)
getServiceAccountToken A helper method for formulating an authorization token when using Service Accounts for user authentication.Enums.SignInType
getSignInMethods(String email)
getSignInMethods gets the SignInMethods the server supports.String[]
getSupportedFileTypes()
getSupportedFileTypesString
getUserFullName()
getUserFullNameItemListJson<WorkspaceInfoJson>
getUserRooms()
returns the list of VDRs the user is permitted toString[]
getVerifiedEmails()
getVerifiedEmailsList<AvailableUserInfoJson>
getVerifiedUsers()
getVerifiedUsers gets the verified users on this machine against the server in the connectionboolean
isAdminInRoom(String roomID)
isAdminInRoomboolean
isAutoSignInOn()
IsAutoSignInOnboolean
isEmailVerified(String email)
IsEmailVerifiedboolean
isOAuth()
isOAuthboolean
isServiceAccount()
isServiceAccount Determines if the signing type is Service Account or notString
Issuer()
IssuerEnums.LoginResult
lastLoginResult()
lastLoginResult returns the last login result from password authentication attemptDate
lastUserPlansRefreshTime()
lastUserPlansRefreshTimevoid
loadServiceAccountSession(String userEmail, String issuer, int expiresInMinutes, PrivateKey privateKey, String encryptionAlgorithm)
LoadServiceAccountSessionString
logoffUri()
logoffUriString
MultimodeUri()
MultimodeUrivoid
setUserRooms(ItemListJson<WorkspaceInfoJson> m_UserRooms)
setUserRoomsString
signInWithOAuth(String email, String refreshToken, boolean showUiIfRefreshFails)
Authenticate with OAuth identity provider.String
signInWithServiceAccount(String userEmail, String issuer, int expiresInMinutes, PrivateKey privateKey, String encryptionAlgorithm)
SignInWithServiceAccountEnums.SignInType
supportedMethod()
supportedMethodUser
userInfo()
userInfo
-
-
-
Constructor Detail
-
SignInManager
public SignInManager(APISession apiSession)
SignInManager constructor- Parameters:
apiSession
-
-
-
Method Detail
-
lastLoginResult
public Enums.LoginResult lastLoginResult()
lastLoginResult returns the last login result from password authentication attempt- Returns:
- LoginResult m_LoginResult
-
getUserRooms
public ItemListJson<WorkspaceInfoJson> getUserRooms()
returns the list of VDRs the user is permitted to- Returns:
- ItemListJson of WorkspaceInfoJson m_UserRooms
-
setUserRooms
public void setUserRooms(ItemListJson<WorkspaceInfoJson> m_UserRooms)
setUserRooms- Parameters:
m_UserRooms
-
-
userInfo
public User userInfo()
userInfo- Returns:
- User m_UserInfo
-
authUri
public String authUri()
authUri- Returns:
- String m_AuthUri
-
accessUri
public String accessUri()
accessUri- Returns:
- String m_AccessUri
-
logoffUri
public String logoffUri()
logoffUri- Returns:
- String m_LogoutUri
-
supportedMethod
public Enums.SignInType supportedMethod()
supportedMethod- Returns:
- SignInType
-
getRefreshToken
public String getRefreshToken()
getRefreshToken- Returns:
- String m_RefreshToken
-
expiryTimeInSeconds
public int expiryTimeInSeconds()
expiryTimeInSeconds- Returns:
- int m_ExpirationTimeInSeconds
-
lastUserPlansRefreshTime
public Date lastUserPlansRefreshTime()
lastUserPlansRefreshTime- Returns:
- Date m_LastUserPlansRefreshTime
-
getServerVersion
public org.apache.maven.artifact.versioning.DefaultArtifactVersion getServerVersion()
getServerVersion- Returns:
- DefaultArtifactVersion m_ServerVersion
-
MultimodeUri
public String MultimodeUri()
MultimodeUri- Returns:
- String m_MultimodeUri
-
Issuer
public String Issuer()
Issuer- Returns:
- String m_Issuer
-
ExpiresInMinutes
public int ExpiresInMinutes()
ExpiresInMinutes- Returns:
- int m_ExpiresInMinutes service account expiration time in minutes
-
getEncryptionAlgorithm
public String getEncryptionAlgorithm()
getEncryptionAlgorithm- Returns:
- String m_encryptionAlgorithm
-
getPrivateKey
public PrivateKey getPrivateKey()
getPrivateKey- Returns:
- PrivateKey m_PrivateKey
-
getUserFullName
public String getUserFullName()
getUserFullName- Returns:
- String m_UserInfo.getFullName()
-
signInWithServiceAccount
public String signInWithServiceAccount(String userEmail, String issuer, int expiresInMinutes, PrivateKey privateKey, String encryptionAlgorithm)
SignInWithServiceAccount- Parameters:
userEmail
-issuer
-expiresInMinutes
-privateKey
-encryptionAlgorithm
-- Returns:
- String ssid SSID if succeeded, empty string otherwise
-
signInWithOAuth
public String signInWithOAuth(String email, String refreshToken, boolean showUiIfRefreshFails)
Authenticate with OAuth identity provider.- Parameters:
email
-refreshToken
-showUiIfRefreshFails
-- Returns:
- SSID if succeeded, empty string otherwise
- Throws:
HttpException
IOException
-
getOAuthAccessToken
public String getOAuthAccessToken(String accessRequestUri, String email, String refreshToken)
getOAuthAccessToken- Parameters:
accessRequestUri
-email
-refreshToken
-- Returns:
- access_token
-
loadServiceAccountSession
public void loadServiceAccountSession(String userEmail, String issuer, int expiresInMinutes, PrivateKey privateKey, String encryptionAlgorithm)
LoadServiceAccountSession- Parameters:
userEmail
-issuer
-expiresInMinutes
-privateKey
-encryptionAlgorithm
-
-
isAutoSignInOn
public boolean isAutoSignInOn()
IsAutoSignInOn- Returns:
- true if AutoSignIn is possible
-
getAutoSignInEmail
public String getAutoSignInEmail()
getAutoSignInEmail- Returns:
- String saved email used for auto sign in
-
getVerifiedEmails
public String[] getVerifiedEmails()
getVerifiedEmails- Returns:
- String[] array of all the authenticated emails
-
getVerifiedUsers
public List<AvailableUserInfoJson> getVerifiedUsers()
getVerifiedUsers gets the verified users on this machine against the server in the connection- Returns:
- List of AvailableUserInfoJson
-
getSignInMethods
public Enums.SignInType getSignInMethods(String email)
getSignInMethods gets the SignInMethods the server supports.- Parameters:
email
-- Returns:
- SignInType
-
isEmailVerified
public boolean isEmailVerified(String email)
IsEmailVerified- Parameters:
email
-- Returns:
- true if the given email is authenticated with the server
-
isAdminInRoom
public boolean isAdminInRoom(String roomID)
isAdminInRoom- Parameters:
roomID
-- Returns:
- true if the logged in user is authenticated in the given room
-
getSupportedFileTypes
public String[] getSupportedFileTypes()
getSupportedFileTypes- Returns:
- String[] array of supported file types
-
getServiceAccountToken
public String getServiceAccountToken(String userEmail, String issuer, int expiresInMinutes, PrivateKey privateKey, String encryptionAlgorithm)
getServiceAccountToken A helper method for formulating an authorization token when using Service Accounts for user authentication.- Parameters:
userEmail
-issuer
-expiresInMinutes
-privateKey
-encryptionAlgorithm
-- Returns:
- String authToken The authorization token to be used in making API requests
-
isOAuth
public boolean isOAuth()
isOAuth- Returns:
- true if signIn type is OAuth or EmailOverOAuth
-
isServiceAccount
public boolean isServiceAccount()
isServiceAccount Determines if the signing type is Service Account or not- Returns:
- true if the signIn type is Service Account, false otherwise
-
-