Package org.cyclos.entities.access
Class OidcAuthorization
- java.lang.Object
-
- org.cyclos.entities.SimpleEntity
-
- org.cyclos.entities.NetworkedEntity
-
- org.cyclos.entities.access.OidcAuthorization
-
- All Implemented Interfaces:
Cloneable,HasCurrency,HasCurrencyAmount,HasNetwork,ProcessableForProxying,DelegatingMutableUserPrincipal,DelegatingUserPrincipal,UserPrincipal,IEntity,HasAmount
@Entity public class OidcAuthorization extends NetworkedEntity implements DelegatingMutableUserPrincipal, HasCurrencyAmount
An authorization token represents a consent. It stores the principal the user used to authorize.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.cyclos.entities.SimpleEntity
SimpleEntity.EntityLoadNotifier
-
-
Constructor Summary
Constructors Constructor Description OidcAuthorization()
-
Method Summary
-
Methods inherited from class org.cyclos.entities.NetworkedEntity
isGlobal
-
Methods inherited from class org.cyclos.entities.SimpleEntity
equals, getId, hashCode, id, ids, isPersistent, isTransient, register, setId, toShortString, toString, uniqueIds, uniqueIds
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.cyclos.entities.users.DelegatingMutableUserPrincipal
initFrom
-
Methods inherited from interface org.cyclos.entities.users.DelegatingUserPrincipal
getDelegate, getPrincipal
-
Methods inherited from interface org.cyclos.entities.banking.HasCurrency
round, withCurrency
-
Methods inherited from interface org.cyclos.entities.banking.HasCurrencyAmount
getCurrencyAmount
-
Methods inherited from interface org.cyclos.entities.ProcessableForProxying
getProxyClass
-
-
-
-
Method Detail
-
getAccessClient
public AccessClient getAccessClient()
- Specified by:
getAccessClientin interfaceUserPrincipal
-
getAccountType
public UserAccountType getAccountType()
- Specified by:
getAccountTypein interfaceUserPrincipal
-
getAmount
public BigDecimal getAmount()
-
getAuthorizationCode
public String getAuthorizationCode()
-
getAuthorizationCodeExpiration
public Date getAuthorizationCodeExpiration()
-
getBasicUser
public BasicUser getBasicUser()
- Specified by:
getBasicUserin interfaceUserPrincipal
-
getClient
public BaseOidcClient getClient()
-
getConsentDate
public Date getConsentDate()
-
getConsentRemoteAddress
public String getConsentRemoteAddress()
-
getCreationDate
public Date getCreationDate()
-
getCurrency
public Currency getCurrency()
- Specified by:
getCurrencyin interfaceHasCurrency
-
getCustomFieldValue
public UserCustomFieldValue getCustomFieldValue()
- Specified by:
getCustomFieldValuein interfaceUserPrincipal
-
getDisplay
public String getDisplay()
-
getExpirationDate
public Date getExpirationDate()
-
getGrantedAccountType
public UserAccountType getGrantedAccountType()
-
getLocator
public String getLocator()
-
getLoginHint
public String getLoginHint()
-
getMobilePhone
public MobilePhone getMobilePhone()
- Specified by:
getMobilePhonein interfaceUserPrincipal
-
getNetwork
public Network getNetwork()
Description copied from interface:HasNetworkReturns the network this entity belongs to- Specified by:
getNetworkin interfaceHasNetwork
-
getNonce
public String getNonce()
-
getPayment
public BasePayment getPayment()
-
getPaymentAmount
public BigDecimal getPaymentAmount()
-
getPaymentCurrency
public Currency getPaymentCurrency()
-
getPaymentTo
public User getPaymentTo()
-
getPrincipalType
public PrincipalType getPrincipalType()
- Specified by:
getPrincipalTypein interfaceUserPrincipal
-
getRedirectUrl
public String getRedirectUrl()
-
getRefreshToken
public String getRefreshToken()
-
getResponseMode
public ResponseMode getResponseMode()
-
getResponseType
public String getResponseType()
-
getResponseTypes
public Collection<String> getResponseTypes()
-
getScope
public String getScope()
-
getState
public String getState()
-
getStatus
public AuthorizationStatus getStatus()
-
getToken
public Token getToken()
- Specified by:
getTokenin interfaceUserPrincipal
-
getTokenRequestDate
public Date getTokenRequestDate()
-
getTrustedDevice
public TrustedDevice getTrustedDevice()
- Specified by:
getTrustedDevicein interfaceUserPrincipal
-
isAuthorizationCodeExpired
public boolean isAuthorizationCodeExpired()
Returns whether the authorization code has expired, with 3 minutes tolerance to account for clock-skew
-
isCode
public boolean isCode()
-
isIdToken
public boolean isIdToken()
-
isOfflineAccess
public boolean isOfflineAccess()
-
isOidcOnly
public boolean isOidcOnly()
-
isOpenid
public boolean isOpenid()
-
isToken
public boolean isToken()
-
setAccessClient
public void setAccessClient(AccessClient accessClient)
- Specified by:
setAccessClientin interfaceDelegatingMutableUserPrincipal
-
setAccountType
public void setAccountType(UserAccountType accountType)
- Specified by:
setAccountTypein interfaceDelegatingMutableUserPrincipal
-
setAuthorizationCode
public void setAuthorizationCode(String authorizationCode)
-
setAuthorizationCodeExpiration
public void setAuthorizationCodeExpiration(Date tokenExpirationDate)
-
setBasicUser
public void setBasicUser(BasicUser basicUser)
- Specified by:
setBasicUserin interfaceDelegatingMutableUserPrincipal
-
setClient
public void setClient(BaseOidcClient client)
-
setConsentDate
public void setConsentDate(Date consentDate)
-
setConsentRemoteAddress
public void setConsentRemoteAddress(String consentRemoteAddress)
-
setCreationDate
public void setCreationDate(Date creationDate)
-
setCustomFieldValue
public void setCustomFieldValue(UserCustomFieldValue customFieldValue)
- Specified by:
setCustomFieldValuein interfaceDelegatingMutableUserPrincipal
-
setDisplay
public void setDisplay(String display)
-
setExpirationDate
public void setExpirationDate(Date expirationDate)
-
setGrantedAccountType
public void setGrantedAccountType(UserAccountType grantedAccountType)
-
setLocator
public void setLocator(String locator)
-
setLoginHint
public void setLoginHint(String loginHint)
-
setMobilePhone
public void setMobilePhone(MobilePhone mobilePhone)
- Specified by:
setMobilePhonein interfaceDelegatingMutableUserPrincipal
-
setNonce
public void setNonce(String nonce)
-
setOidcOnly
public void setOidcOnly(boolean oidcOnly)
-
setPayment
public void setPayment(BasePayment payment)
-
setPaymentAmount
public void setPaymentAmount(BigDecimal paymentAmount)
-
setPaymentCurrency
public void setPaymentCurrency(Currency paymentCurrency)
-
setPaymentTo
public void setPaymentTo(User paymentTo)
-
setPrincipalType
public void setPrincipalType(PrincipalType principalType)
- Specified by:
setPrincipalTypein interfaceDelegatingMutableUserPrincipal
-
setRedirectUrl
public void setRedirectUrl(String redirectUrl)
-
setRefreshToken
public void setRefreshToken(String refreshToken)
-
setResponseMode
public void setResponseMode(ResponseMode responseMode)
-
setResponseType
public void setResponseType(String responseType)
-
setScope
public void setScope(String scope)
-
setState
public void setState(String state)
-
setToken
public void setToken(Token token)
- Specified by:
setTokenin interfaceDelegatingMutableUserPrincipal
-
setTokenRequestDate
public void setTokenRequestDate(Date tokenRequestDate)
-
setTrustedDevice
public void setTrustedDevice(TrustedDevice trustedDevice)
- Specified by:
setTrustedDevicein interfaceDelegatingMutableUserPrincipal
-
-