Class EntityMapper

java.lang.Object
io.meeds.oauth2.server.util.EntityMapper

public class EntityMapper extends Object
  • Field Details

  • Method Details

    • toObject

      public static org.springframework.security.oauth2.server.authorization.client.RegisteredClient toObject(OAuthClientEntity entity)
    • toEntity

      public static void toEntity(org.springframework.security.oauth2.server.authorization.client.RegisteredClient registeredClient, OAuthClientEntity entity)
    • toObject

      public static org.springframework.security.oauth2.server.authorization.OAuth2Authorization toObject(OAuthTokenEntity entity)
    • toSimplifiedObject

      public static OAuthAccessToken toSimplifiedObject(OAuthTokenEntity entity)
    • toEntity

      public static OAuthTokenEntity toEntity(org.springframework.security.oauth2.server.authorization.OAuth2Authorization authorization, String hmacKey)
    • toObject

      public static org.springframework.security.oauth2.server.authorization.OAuth2AuthorizationConsent toObject(OAuthConsentEntity entity)
    • toSimplifiedObject

      public static OAuthConsent toSimplifiedObject(OAuthConsentEntity entity)
    • toEntity

      public static void toEntity(org.springframework.security.oauth2.server.authorization.OAuth2AuthorizationConsent authorizationConsent, OAuthConsentEntity entity)
    • hashToken

      public static String hashToken(String token, String hmacKey)
      Encryption can be randomized, thus use deterministic Hash for lookup with a fixed secret HMAC key switch platform (CodecInitializer Key encrypted constant)
      Parameters:
      token - Token to hash
      hmacKey - Secret key for MAC
      Returns:
      Deterministically hashed value used for lookup