All Downloads are FREE. Search and download functionalities are using the official Maven repository.

skinny.oauth2.client.AuthenticationCode.scala Maven / Gradle / Ivy

There is a newer version: 3.1.0
Show newest version
package skinny.oauth2.client

import javax.servlet.http.HttpServletRequest

import org.apache.oltu.oauth2.client.response.OAuthAuthzResponse

/**
 * Authorization Code from redirect URI
 * @param value
 */
case class AuthenticationCode(value: String)

object AuthenticationCode {

  def from(request: HttpServletRequest): Option[AuthenticationCode] = {
    Option(OAuthAuthzResponse.oauthCodeAuthzResponse(request)).map(res => AuthenticationCode(res.getCode))
  }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy