Class DefaultOpenIdConnectServiceAccount

java.lang.Object
com.aquima.web.boot.security.openid.DefaultOpenIdConnectServiceAccount
All Implemented Interfaces:
OpenIdConnectAuthentication, OpenIdConnectServiceAuthentication, com.blueriq.component.api.security.BlueriqAuthentication, com.blueriq.component.api.security.BlueriqServiceAccount, Serializable, Principal, org.springframework.security.core.Authentication

public class DefaultOpenIdConnectServiceAccount extends Object implements OpenIdConnectServiceAuthentication
Default implementation of the Blueriq Service Account using OpenID Connect. This implementation does not renew its access token when it expires.
Since:
11.6
Author:
Petru Galanton
See Also:
  • Constructor Details

    • DefaultOpenIdConnectServiceAccount

      public DefaultOpenIdConnectServiceAccount(String clientId)
    • DefaultOpenIdConnectServiceAccount

      public DefaultOpenIdConnectServiceAccount(String clientId, String accessToken, long expiresAt, List<String> roles, Map<String,List<String>> claims)
  • Method Details

    • getEncodedAccessToken

      public String getEncodedAccessToken()
      Description copied from interface: OpenIdConnectAuthentication
      The access token in encoded form. This form is suitable for use in an Authorization: Bearer header.
      Specified by:
      getEncodedAccessToken in interface OpenIdConnectAuthentication
      Returns:
      the encoded access token
    • isAccessTokenExpired

      public boolean isAccessTokenExpired()
      Specified by:
      isAccessTokenExpired in interface OpenIdConnectServiceAuthentication
      Returns:
      true if the access token is expired
    • getAuthorities

      public Collection<? extends org.springframework.security.core.GrantedAuthority> getAuthorities()
      Specified by:
      getAuthorities in interface org.springframework.security.core.Authentication
    • getCredentials

      public Object getCredentials()
      Specified by:
      getCredentials in interface org.springframework.security.core.Authentication
    • getDetails

      public Object getDetails()
      Specified by:
      getDetails in interface org.springframework.security.core.Authentication
    • getPrincipal

      public Object getPrincipal()
      Specified by:
      getPrincipal in interface org.springframework.security.core.Authentication
    • isAuthenticated

      public boolean isAuthenticated()
      Specified by:
      isAuthenticated in interface org.springframework.security.core.Authentication
    • setAuthenticated

      public void setAuthenticated(boolean isAuthenticated) throws IllegalArgumentException
      Specified by:
      setAuthenticated in interface org.springframework.security.core.Authentication
      Throws:
      IllegalArgumentException
    • getName

      public String getName()
      Specified by:
      getName in interface Principal
    • getTeams

      public List<String> getTeams()
      Specified by:
      getTeams in interface com.blueriq.component.api.security.BlueriqAuthentication
    • getRoles

      public List<String> getRoles()
      Specified by:
      getRoles in interface com.blueriq.component.api.security.BlueriqAuthentication
    • isAnonymous

      public boolean isAnonymous()
      Specified by:
      isAnonymous in interface com.blueriq.component.api.security.BlueriqAuthentication
    • isAutomatic

      public boolean isAutomatic()
      Specified by:
      isAutomatic in interface com.blueriq.component.api.security.BlueriqAuthentication
    • getClaimNames

      public Set<String> getClaimNames()
      Specified by:
      getClaimNames in interface com.blueriq.component.api.security.BlueriqAuthentication
    • getClaim

      public List<String> getClaim(String name)
      Specified by:
      getClaim in interface com.blueriq.component.api.security.BlueriqAuthentication
    • setClaims

      public void setClaims(Map<String,List<String>> claims)