I have 2 questions on the Spring Authorization Server OAuth2 client creation which are probably silly sounding ones.
Question 1:
In the examples in the Spring Authorization Server I saw “{noop}secret”. What is that “{noop”} supposed to do as in the following code?
RegisteredClient.withId(UUID.randomUUID().toString())
.clientId(clientId)
.clientSecret("{noop}"+secret). //<-- this
.clientAuthenticationMethod(ClientAuthenticationMethod.CLIENT_SECRET_BASIC)
.authorizationGrantType(AuthorizationGrantType.CLIENT_CREDENTIALS)
.scope(OidcScopes.OPENID)
.scope(OidcScopes.PROFILE)
I didn’t create any beans such as BCryptPasswordEncoder so sounds like I need to declare a bean of that type. Do I need to then encode the secret programmatically when saving the OAuth2 Client such as like this:
.clientSecret(bcryptPassword.encode(secret)). // like that?
Question 2:
I created a OAuth2 client few months back and now I can’t remember the secret anymore. When I look in the database it is in bcrypt form `”{bcrypt}$2a$…” which I don’t know how it became that value. I believe it was in “{noop}mysecretvalue”.
Thank you