SecretsSnapshot

com.gu.play.secretrotation.SecretsSnapshot

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Abstract methods

def decode[T](decodingFunc: String => T, conclusiveDecode: T => Boolean): Option[T]

Value parameters

conclusiveDecode

If true, no further attempts to decode with other secrets will be made, and the decoding result will be returned, wrapped in an Option. Note that a decode can be conclusive without the decoded value being valid - eg. the value may have been signed with a valid secret but expired due to it's own expiration constraints, or even maliciously signed with an unacceptable algorithm (eg a weak algorithm, even 'none' : https://tools.ietf.org/html/rfc7519#section-6.1 )

decodingFunc

a function that attempts to decode a value using the provided secret

Attributes

def description: String
def secrets: Phase[String]

Concrete methods

def decodeOpt[T](decodingFunc: String => Option[T]): Option[T]

This convenience function lets you attempt to decode a value using all applicable secrets, assuming that a successful decode will lead to a populated Option.

This convenience function lets you attempt to decode a value using all applicable secrets, assuming that a successful decode will lead to a populated Option.

Value parameters

decodingFunc

a function that attempts to decode a value using the provided secret - the function should return Some(value) if the decoding was successful, or None if it was not

Attributes