class AuthManager[F[_]] extends LazyLogger
Convenience functions to work with ADAL tokens. If tenant and authorityHostUrl are undefined,
it is attempted to derive them from username (the demain part) and using a default authority hostname
https://login.windows.net
. If acquireTokenResource is undefined, dataUrl is tried in its place.
- Alphabetic
- By Inheritance
- AuthManager
- LazyLogger
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new AuthManager(info: ConnectionInfo)(implicit F: Async[F], PtoF: ~>[Promise, F])
Value Members
- val authority: Option[String]
-
def
getAuthContext(): AuthenticationContext
Obtain an AuthenticatonContext.
Obtain an AuthenticatonContext. Throw TokenRequestError on failure.
-
def
getToken(ctx: AuthenticationContext): F[TokenInfo]
Get a token wrapped in an effect.
Get a token wrapped in an effect. No retry is performed if the request fails.
-
def
getTokenWithRetry(ctx: AuthenticationContext, retryPolicy: (F[TokenInfo]) ⇒ F[TokenInfo]): F[TokenInfo]
Get a token with a potential retry.
-
val
hasUsernameAndPassword: Boolean
true if we should use username/password, false use client credentials.
-
lazy val
logger: Logger
- Definition Classes
- LazyLogger
- val tenant: UndefOr[Serializable]
- val tokenResource: UndefOr[String]
-
def
tokenStream(ctx: AuthenticationContext, retryPolicy: (F[TokenInfo]) ⇒ F[TokenInfo], calc: (TokenInfo) ⇒ FiniteDuration = AuthManager.defaultCalc)(implicit timer: Timer[F]): Stream[F, TokenInfo]
Get a token stream.