enum

KemalIdentity::CredentialKind

Inherits Enum < Comparable < Value < Object

Which kind of credential proved a request.

Append only. A consumer is expected to write case credential.kind over these, so renaming or removing a member breaks code that compiled yesterday. New built-in kinds are added at the end.

There is no Remembered and no Legacy member, and their absence is deliberate. Both a restored remember-me login and an adopted legacy session mint a real session row and are presented as a session cookie from that point on, so a request one minute later is indistinguishable from any other session. A kind that said Remembered on the first request and Session on the second would be a worse lie than not saying it: what actually differs is the assurance, and AssuranceLevel::Remembered already carries that, durably, on the session row.

Constants

Session = 0

A server-side session, presented as a cookie.

ApiToken = 1

An opaque personal access token, presented as a bearer credential.

Jwt = 2

A signed JWT, presented as a bearer credential.

Custom = 3

Anything an application's own RequestAuthenticator established.

The escape hatch that keeps this enum from being a closed world. An application with two custom credential families tells them apart by CredentialRef#name, not by this.

Instance methods

api_token?

Returns true if this enum value equals ApiToken

Source
custom?

Returns true if this enum value equals Custom

Source
jwt?

Returns true if this enum value equals Jwt

Source
session?

Returns true if this enum value equals Session

Source