pub struct AuthorizationResponse {
pub code: String,
pub state: Option<String>,
pub iss: String,
}Expand description
The success redirect parameters (RFC 6749 section 4.1.2).
Debug is HAND-WRITTEN (above) and does not print the code. The RECORD form of the same
value, AuthorizationCodeRecord, has been hand-redacted since it was written, for the reason
stated there – RFC 6749 section 4.1.2 makes a code a credential in its own right – and this
type, which carries the same string to the client, was left deriving until 0.9.2. A host that
logs the response it is about to redirect with would have written a live, unredeemed code into
its logs; PKCE binds the code to a DIFFERENT client, not to a reader who has the log and the
verifier, and for a confidential client it does not bind at all.
Fields§
§code: StringThe single-use authorization code.
state: Option<String>The request’s state, echoed verbatim; REQUIRED iff the request carried one.
iss: StringRFC 9207 section 2: this server’s issuer identifier, so a client talking to several authorization servers can tell WHICH one answered.
Not an Option: this server always supports RFC 9207 and its metadata says so
(authorization_response_iss_parameter_supported), and section 2 makes the parameter
mandatory for a server that does. A response that could omit it would be a response a
client cannot rely on, which defeats the mix-up countermeasure RFC 9700 section 4.4 is
asking for.
Implementations§
Source§impl AuthorizationResponse
impl AuthorizationResponse
Sourcepub fn location(&self, redirect_uri: &str) -> String
pub fn location(&self, redirect_uri: &str) -> String
The Location header value for the success redirect.
Parameter ORDER is not constrained by any RFC (RFC 6749 section 4.1.2 and RFC 9207
section 2 both describe an unordered set of query parameters), so iss is appended last
purely to keep the existing prefix of the URL unchanged.
Trait Implementations§
Source§impl Clone for AuthorizationResponse
impl Clone for AuthorizationResponse
Source§fn clone(&self) -> AuthorizationResponse
fn clone(&self) -> AuthorizationResponse
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AuthorizationResponse
Hand-written so the one-time code never prints. state and iss print in full: state is
the client’s own opaque value echoed back and iss is this server’s public identifier.
impl Debug for AuthorizationResponse
Hand-written so the one-time code never prints. state and iss print in full: state is
the client’s own opaque value echoed back and iss is this server’s public identifier.