Skip to content

Instantly share code, notes, and snippets.

@crspybits
Created October 23, 2021 21:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save crspybits/b2150c56ac564890b72ae9be120d7f01 to your computer and use it in GitHub Desktop.
Save crspybits/b2150c56ac564890b72ae9be120d7f01 to your computer and use it in GitHub Desktop.
ResourceCredentials
public protocol ResourceConfigurable {
// The public PEM key converted to a JWK.
var jwk: JWK_RSA { get }
var privateKey: String { get }
var clientId: String { get }
var clientSecret: String { get }
// The "base URL" to use to make requests to the users Solid Pod.
var storageIRI: URL { get }
var tokenEndpoint: URL { get }
var authenticationMethod: TokenEndpointAuthenticationMethod { get }
var refreshDelegate:RefreshDelegate? { get }
}
public protocol ResourceCredentials: AnyObject {
var resourceConfigurable: ResourceConfigurable! { get }
// Leave this nil. Just a convenience.
var tokenRequest:TokenRequest<JWK_RSA>? { get set }
var accessToken: String! { get set }
var refreshToken: String! { get set }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment