spring security BearerTokenMetadata 源码
spring security BearerTokenMetadata 代码
文件路径:/rsocket/src/main/java/org/springframework/security/rsocket/metadata/BearerTokenMetadata.java
/*
* Copyright 2019 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.security.rsocket.metadata;
import org.springframework.http.MediaType;
import org.springframework.util.MimeType;
/**
* Represents a bearer token that has been encoded into a
* {@link io.rsocket.Payload#metadata() Payload#metadata()}.
*
* @author Rob Winch
* @since 5.2
*/
public class BearerTokenMetadata {
/**
* Represents a bearer token which is encoded as a String.
*
* See <a href="https://github.com/rsocket/rsocket/issues/272">rsocket/rsocket#272</a>
* @deprecated Basic did not evolve into the standard. Instead use Simple
* Authentication
* MimeTypeUtils.parseMimeType(WellKnownMimeType.MESSAGE_RSOCKET_AUTHENTICATION.getString())
*/
@Deprecated
public static final MimeType BEARER_AUTHENTICATION_MIME_TYPE = new MediaType("message",
"x.rsocket.authentication.bearer.v0");
private final String token;
public BearerTokenMetadata(String token) {
this.token = token;
}
public String getToken() {
return this.token;
}
}
相关信息
相关文章
spring security BasicAuthenticationDecoder 源码
spring security BasicAuthenticationEncoder 源码
spring security BearerTokenAuthenticationEncoder 源码
0
赞
热门推荐
-
2、 - 优质文章
-
3、 gate.io
-
8、 golang
-
9、 openharmony
-
10、 Vue中input框自动聚焦