26 Haziran 2018 Salı

SpringSecurity OAuth2 InMemoryTokenStore Sınıfı

Giriş
Açıklaması şöyle.
The default InMemoryTokenStore is perfectly fine for a single server (i.e. low traffic and no hot swap to a backup server in the case of failure). Most projects can start here, and maybe operate this way in development mode, to make it easy to start a server with no dependencies. read more
Örnek
Şöyle yaparız.
@Configuration
public class OAuth2ServerConfiguration {

  @Autowired
  private TokenStore tokenStore;

  @Bean
  public TokenStore tokenStore() {
    return new InMemoryTokenStore();
  }
  ...
} 

Hiç yorum yok:

Yorum Gönder