Class OAuth2Authorization
java.lang.Object
com.codename1.backend.security.oauth2.server.authorization.OAuth2Authorization
One grant: a user -- or, for the device grant, nobody yet -- having let one
client act with some scopes. The authorization code, the refresh tokens and
the device and user codes issued under it are kept beside it by the
OAuth2AuthorizationService, as hashes; removing the grant revokes them
all.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAttribute(String name) One attribute, or null.longlonggetId()Who made the grant; empty for a device grant nobody has answered.TheRegisteredClient.getId()of the client the grant was made to.withExpiresAt(long expiresAt) This grant, good untilexpiresAt.
-
Field Details
-
ACTIVE
-
PENDING
-
DENIED
-
-
Constructor Details
-
OAuth2Authorization
public OAuth2Authorization(String id, String registeredClientId, String principalName, String authorizationGrantType, Collection<String> scopes, String status, Map<String, Object> attributes, long createdAt, long expiresAt) - Parameters:
attributes- what else is remembered of the grant, as text, numbers, lists and mapscreatedAt- epoch millisecondsexpiresAt- when nothing issued under the grant can be used any more, in epoch milliseconds
-
-
Method Details
-
getId
-
getRegisteredClientId
TheRegisteredClient.getId()of the client the grant was made to. -
getPrincipalName
Who made the grant; empty for a device grant nobody has answered. -
getAuthorizationGrantType
-
getScopes
-
getStatus
-
getAttributes
-
getAttribute
-
getCreatedAt
public long getCreatedAt() -
getExpiresAt
public long getExpiresAt() -
withExpiresAt
This grant, good untilexpiresAt.
-